@if (count(get_active_users()))
    <div class="card mt-2">
        <div class="card-body active-users pt-2">
            <div class="text-center mt-1 mb-0 text-muted">活跃用户</div>
            <hr class="mt-2">
            @foreach (get_active_users() as $user)
                <a class="media mt-2" href="{{ route('users.show', $user->id) }}">
                    <div class="media-left media-middle mr-2 ml-1">
                        <img src="{{ $user->avatar }}" alt="{{ $user->name }}" width="24px" height="24px"
                             class="media-object">
                    </div>
                    <div class="media-body d-flex justify-content-between">
                        <small class="media-heading text-secondary">{{ $user->name }}</small>

                        <small class="badge badge-pill badge-hint">{{ $user->score }}</small>
                    </div>
                </a>
            @endforeach
        </div>
    </div>
@endif

@if (count(get_tags()))
    <div class="card mt-2">
        <div class="card-body active-users pt-2">
            <div class="text-center mt-1 mb-0 text-muted">热门标签</div>
            <hr class="mt-2">
            @foreach (get_tags() as $tag)
                <a class="badge badge-secondary mr-1 mb-1" href="{{ route('tags.show', $tag->id) }}">
                    {{ $tag->name }}
                    {{--<span class="badge badge-secondary">{{ $tag->topic_count }}</span>--}}
                </a>

            @endforeach
        </div>
    </div>
@endif

@if (count(get_hot_topics()))
    <div class="card mt-2">
        <div class="card-body pt-2">
            <div class="text-center mt-1 mb-0 text-muted">热门话题</div>
            <hr class="mt-2 mb-3">
            @foreach (get_hot_topics() as $hot_topic)
                <a class="media mt-1" href="{{ $hot_topic->link() }}" target="_blank">
                    <div class="media-body">
                        <span class="media-heading text-muted">{{ $hot_topic->title }}</span>
                    </div>
                </a>
            @endforeach
        </div>
    </div>
@endif

@if (count(get_links()))
    <div class="card mt-2">
        <div class="card-body pt-2">
            <div class="text-center mt-1 mb-0 text-muted">资源推荐</div>
            <hr class="mt-2 mb-3">
            @foreach (get_links() as $link)
                <a class="media mt-1" href="{{ $link->link }}" target="_blank">
                    <div class="media-body">
                        <span class="media-heading text-muted">{{ $link->title }}</span>
                    </div>
                </a>
            @endforeach
        </div>
    </div>
@endif

